package org.unit.testmgmt.preferences;

import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.jface.preference.IPreferenceStore;
import org.unit.testmgmt.Activator;

/**
 * Initializer for the unit-testmgmt-preference-values.
 * 
 * @author Robert Streng
 */
public class UTMPreferenceInitializer extends AbstractPreferenceInitializer
		implements IUTMPreferenceConstants {

	public static final String DEFAULT_METHOD_FILTER_NAME = "get*;set*;";
	public static final String DEFAULT_METHOD_FILTER_MODIFIER = "private;protected;package;";

	@Override
	public void initializeDefaultPreferences() {
		IPreferenceStore store = Activator.getDefault().getPreferenceStore();

		store.setDefault(TML_CONTAINER, "test_files");

		store.setDefault(TEST_PROJECT_POSTFIX, ".test");

		store.setDefault(TEST_CLASS_SUPER_TYPE, "");
		
		store.setDefault(TEST_CLASS_POSTFIX, "Test");

		store.setDefault(TEST_PACKAGE_POSTFIX, "test");

		store.setDefault(TEST_METHOD_PREFIX, "test");
		store.setDefault(TEST_METHOD_POSTFIX, "");

		store.setDefault(TEST_METHOD_FILTER_NAME, DEFAULT_METHOD_FILTER_NAME);
		store.setDefault(TEST_METHOD_FILTER_MODIFIER,
				DEFAULT_METHOD_FILTER_MODIFIER);

		// initialize UTM-preference-class
		UTMPreferences.initialize();
	}

}
